易截截图软件、单文件、免安装、纯绿色、仅160KB

ruby操作文件

require 'app/configuration'
module RubyAMF
  module Configuration
    #set the service path used in all requests
    # RubyAMF::App::RequestStore.service_path = File.expand_path(RAILS_ROOT) + '/app/controllers'

    # => CLASS MAPPING CONFIGURATION
    ClassMappings.register(
      :actionscript  => 'Stock',
      :ruby          => 'Stock',
      :type          => 'active_record',
      :attributes    => ["code", "name"])
    end
end
ClassMappings.register(
      :actionscript  => 'Rolestock',
      :ruby          => 'Rolestock',
      :type          => 'active_record',
      :associations  => ["stock"],
      :attributes    => ["id", "cost", "amount"])


上面算是整个文件吧,之后我在另一个同等级路径文件下要操作这个文件


  File.open("rubyamf_config.rb") do |file|
    while line = file.gets
 


相关问答:

现在学习RUBY,有没有前途。

做了三年。NET了
当然。NET水平也很烂
想多学一些新的语言
这两天在学习RUBY
不知道将来有没有前途

RUBY前辈们,指点一二啊。
别这山看着那山高,其实它们只是你的一个工具,就象武林高手拿个树叶 ......

谁知道好用的Ruby IDE?

谁知道好用的Ruby IDE?


路过帮顶

帮顶

cheng_er你这个头像比我的还黄啊.

友情Up!~

纯顶

引用
cheng_er你这个头像比我的还黄啊.


这年头,奇怪的事情怎么这么多呢我就说
......

ruby 要如何寫bnf

我是用netbeans 去寫bnf

a program will ONLY accept strings based on the following grammar:

            <compute> --> <value> = < ......

ruby中的or到底是什么意思?

Python code:
puts true or false
puts false or true
为什么上面的输出true,下面的输出false?难道只认or前面的?

据说or后面是直接省略的,不知道是不是这样。
楼上的答案好像不是我想要的

ruby社区怎 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号